package com.diy.sigmund.diycommon.designpatterns.adapterpattern.duck;

/**
 * @author ylm-sigmund
 * @since 2022/2/9 16:46
 */
public class DuckTestDrive {

    public static void main(String[] args) {
        MallardDuck mallardDuck = new MallardDuck();
        mallardDuck.quack();
        mallardDuck.fly();

        WildTurkey wildTurkey = new WildTurkey();
        wildTurkey.gobble();
        wildTurkey.fly();

        TurkeyAdapterDuck turkeyAdapterDuck = new TurkeyAdapterDuck(wildTurkey);
        turkeyAdapterDuck.quack();
        turkeyAdapterDuck.fly();
    }
}
